#!/bin/sh

# 获取blog-prod进程ID
blogprocess=`ps -fe | grep "blog-prod" | grep -ivE "grep|cron" | awk '{print $2}'`
if [ "$blogprocess" ];
then
    echo "stop blog-prod process $blogprocess..."
    kill -9 $blogprocess
    sleep 2
fi

#nohup ./blog-prod -env=prod >> logs/blog-prod.log 2>&1 &
nohup /wwwroot/prod/target/blog-prod --env=prod --configPath=/wwwroot/prod/target/blog/config >> /wwwroot/prod/logs/blog-prod.log 2>&1 &

echo "start blog-prod success!!!"
